package com.woniu.smart.service.impl;

import com.woniu.smart.dto.EnterpricesDTO;
import com.woniu.smart.entity.Staffs;
import com.woniu.smart.mapper.StaffsMapper;
import com.woniu.smart.service.StaffsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description 员工信息表
 *
 * @date 2022/10/22 22:02
 * @author mei
 **/
@Service
public class StaffsServiceImpl implements StaffsService {

    @Autowired
    StaffsMapper staffsMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return staffsMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int  deleteByStaffsPrimaryKeyList(List list){
        return staffsMapper.deleteByStaffsPrimaryKeyList(list);
    };

    @Override
    public List<Staffs>  selectStaffsAll(){
        return staffsMapper.selectStaffsAll();
    };

    /**
     * 删除
     * @param record
     * @return
     */

    @Override
    public int insert(Staffs record) {
        return 0;
    }

    @Override
    public int insertSelective(Staffs record) {
        return staffsMapper.insertSelective(record);
    }

    /***

    * @return int
    * @author meibing
    * @Descrip  新增企业时候，需要联动新增人员表
    */
    @Override
    public int insertSelectivesFotDTO(EnterpricesDTO record) {
        return staffsMapper.insertSelectives(record);
    };

    @Override
    public Staffs selectByPrimaryKey(Long id) {
        return staffsMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Staffs record) {
        return staffsMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Staffs record) {
        return 0;
    }
}
